package com.glory.dgcpcpda.adapter;

import android.graphics.Color;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.glory.dgcpcpda.R;
import com.glory.dgcpcpda.entity.LotInfoEntity;

import java.util.List;

public class LotQcBatchListAdapter extends BaseQuickAdapter<LotInfoEntity, BaseViewHolder> {


    public LotQcBatchListAdapter(@Nullable List<LotInfoEntity> data) {
        super(R.layout.adapter_lot_batch_qc,data);

    }

    @Override
    protected void convert(BaseViewHolder helper, LotInfoEntity item) {
        helper.setText(R.id.tvLotID,String.valueOf(item.getLOT().getLOTID()))
                .setText(R.id.tvStep,item.getLOT().getSTEPDESC())
                .setText(R.id.tvHoldReason,item.getHOLDREASON());
                //.setText(R.id.tvEqpID,item.getEQUIPMENTID())
                //.setGone(R.id.tvEqpID,showEqp);
        if(item.getLOT().getHOLDSTATE().equals("扣货中")){
            helper.setBackgroundColor(R.id.tvLotID, Color.RED);

        }


    }

    public interface onDeleteListener{
        void setOnDeleteListener();
    }
}
